<html xmlns:fn="http://www.w3.org/2005/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SVE array_sum C example</title>
<style type="text/css">
    body { font-size: 62.5%;    /* default 1.0em = 16px, so 62.5% of 16 = 10. Therefore, 1.0em now = 10px, 1.2em now = 12px etc. */
        font-family: Verdana, Arial, "Lucida Grande", sans-serif; margin: 10px; padding: 0; background: #fff; min-width: 999px; }
    /* Content Styling */
    .para { font-size: 1.2em; margin-bottom: 0px; margin-top: 10px; }
    p { font-size: 1.2em; margin-bottom: 0px; margin-top: 10px; }
    h1 { font-size: 1.6em; color: #025066; margin-top: 0px; margin-bottom: 0px; }
    h2 { font-size: 1.4em; font-weight: bold; color: #025066; margin-bottom: 0px; }
    h3 { font-size: 1.2em; font-weight: bold; color: #025066; margin-bottom: 0px; }
    a { color: #127490; }
    a:hover { color: #014153; }
    div.indent { margin-left:10px; margin-right: 10px; margin-bottom: 0px; margin-top: 10px; }
    div.note { font-size: 1.0em; margin-left:10px; margin-right: 10px; margin-bottom: 0px; margin-top: 10px; }
    .table { margin-top: 5px; margin-bottom: 5px; padding:0px; }
    ul li { font-size: 1.0em; list-style-image: url(images/bullet_blue.png); }
    div.toc ul li { font-size: 1.0em; list-style-image: url(images/bullet_blue.png); }
    .table-cell { font-size: 75%; }
    .image { margin-top: 5px; margin-bottom: 5px; padding:0px; }
    .note { margin-bottom: 15px; background: #E0E0E0 }
    .toc { font-size: 115%; margin-left: 20px; margin-top: 10px; margin-bottom: 15px; }
    .italic { font-style: italic; }
    .bold { font-weight: bold; }
    .emphasis { font-weight: bold; font-style: italic; }
    .underline { text-decoration: underline; }
    .bold-underline { text-decoration: underline; font-weight: bold; }
    .arg { font-family: 'Lucida Sans Typewriter', 'Courier New', Courier, monospace; color:#333399; }
    .repl { font-style: italic; }
    .code { font-size: 1.2em; margin-top: 2px; margin-left: 20px; margin-bottom: 2px; color: #333399;
       font-family: 'Lucida Sans Typewriter', 'Courier New', Courier, monospace; }
    .menu { font-weight: bold; }
    .interface { font-weight: bold; }
    ul {margin-top: 2px; margin-bottom: 5px; }
    ol {list-style-type:decimal; margin-top: 2px; margin-bottom: 5px; }
    ol ol {list-style-type:lower-alpha; margin-top: 2px; margin-bottom: 5px; }
    ol ol ol {list-style-type:lower-roman; margin-top: 2px; margin-bottom: 5px; }
    </style>
</head>
<body>
    
    <a name="SVE%20array_sum%20C%20example"></a><h1>SVE array_sum C example - ARM®DS-5™</h1>
    
        <div class="para">This example illustrates building and debugging a simple C application containing floating point arithmetic, featuring Scalable Vector Extension (SVE) optimization.</div>
    

    <div class="indent">
        <a name="Purpose%20and%20scope"></a><h2>Purpose and scope</h2>
        <div class="para">This example illustrates building a simple C application containing floating point arithmetic with ARM Compiler 6 for SVE to generate optimized code with Scalable Vector Extension (SVE) instructions, then running it on the Base_AEMv8A_AEMv8A_SVE model and debugging it in DS-5 Debugger.</div>
    </div>

    <div class="indent">
        <a name="Building%20the%20example"></a><h2>Building the example</h2>
        <div class="para">A ready-made executable <span class="arg">sve_array_sum.axf</span> is provided, pre-built with ARM Compiler 6 for SVE.</div>
        <div class="para">If you wish to modify or rebuild this example, you can do so using the supplied Eclipse project, or directly on the command line with the supplied <span class="arg">Makefile</span>.</div>
        <div class="para">The Eclipse project is a managed builder project, that creates a makefile and objects in the /Debug or /Release directory, depending on the selected build configuration.</div>
    </div>

    <div class="indent">
        <a name="Building%20on%20the%20command-line"></a><h2>Building on the command-line</h2>
        <div class="para">To build the example on the command-line with the supplied <span class="arg">make</span> utility:</div>
        <ul>
           <li><div class="para">On Linux, run the <span class="arg">suite_exec</span> utility with the <span class="arg">--toolchain</span> option to select the compiler and start a shell configured for the suite environment, for example: <span class="arg">~/DS-5/bin/suite_exec --toolchain "ARM Compiler 6 for SVE (DS-5 built-in)" bash</span>
</div></li>
        </ul>
        <div class="para">Then navigate to the <span class="arg">...\sve_array_sum</span> directory, and type:</div>
        <div class="para"><span class="arg">make</span></div>
        <div class="para">The usual <span class="arg">make</span> rules: <span class="arg">clean</span> and <span class="arg">all</span> are provided in the <span class="arg">makefile</span>.</div>
    </div>

    
    <div class="indent">
        <a name="Building%20from%20Eclipse"></a><h2>Building from Eclipse</h2>
        <div class="para">To build the supplied Eclipse projects:</div>
        
    <ol>
        <li><div class="para">In the Project Explorer view, select the project you want to build.</div></li>
        <li><div class="para">Select <span class="menu">Project<span class="para"> → </span>Build Project</span>.</div></li>
    </ol>

    </div>


    <div class="indent">
        <a name="Running%20the%20example"></a><h2>Running the example</h2>
        <div class="para">A ready-made launch configuration <span class="arg">sve_array_sum_FVP.launch</span> is provided.</div>
        <ol>
            <li><div class="para">Select <span class="interface">Debug Configurations</span> from the <span class="interface">Run</span> menu.</div></li>
            <li><div class="para">Select <span class="arg">sve_array_sum_FVP</span> from the list of DS-5 Debugger configurations</div></li>
            <li><div class="para">Click on <span class="interface">Debug</span> to start the debugging and run to the <span class="arg">main()</span> function.</div></li>
            <li><div class="para">Debugging requires the DS-5 Debug perspective. If the Confirm Perspective Switch dialog box opens, click on <span class="interface">Yes</span> to switch perspective.</div></li>
        </ol>
    </div>

    <h2>See also:</h2>
<div class="indent"><ul>
        <li><div class="para"><a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0446-/deb1358797902966.html"><i>Configuring and connecting to a target </i> in <i>DS-5 Debugger User Guide</i></a></div></li>
        <li><div class="para"><a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0446-/index.html"><i>DS-5 Debugger User Guide</i></a></div></li>
        <li><div class="para"><a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0452-/index.html"><i>DS-5 Debugger Command Reference</i></a></div></li>
        <li><div class="para"><a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0837-/index.html"><i>Fixed Virtual Platforms FVP Reference Guide</i></a></div></li>
        <li><div class="para"><a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0481-/index.html"><i>ARM DS-5 ARM DSTREAM User Guide</i></a></div></li>
        <li><div class="para"><a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0446-/deb1359990893211.html"><i>About breakpoints and watchpoints</i> in <i>DS-5 Debugger User Guide</i></a></div></li>
    </ul></div>
<br><br><div align="left" class="legal">
<hr>Copyright© 2010-2016 ARM Limited. All Rights Reserved.</div>
</body>
</html>
